using System;
using System.Collections;
using System.Text;
using System.Text.RegularExpressions;
using Spring.Util;

namespace CoreIMSEE.Core.Common
{
	public struct ScopePath
	{
		private Scope scope;
		private Type keyType;
		private string key;
		private Type collectionItemType;
		private object index;
		private string path;

		private static ScopePath defaultScopePath;

		public static ScopePath Default
		{
			get { return defaultScopePath;}
		}

		public Scope Scope
		{
			get { return scope; }
		}

		public Type KeyType
		{
			get { return keyType; }
		}

		public string Key
		{
			get { return key; }
		}

		public Type CollectionItemType
		{
			get { return collectionItemType; }
		}

		public object Index
		{
			get { return index; }
		}

		public string Path
		{
			get { return path; }
		}

		public bool IsCollection
		{
			get {return index!=null;}
		}

		public ScopePath(Scope scope, Type keyType, string key, Type collectionItemType, object index, string path)
		{
			this.scope = scope;
			this.keyType = keyType;
			this.key = key;
			this.collectionItemType = collectionItemType;
			this.index = index;
			this.path = path;
		}

	}
}
